<?php
// +----------------------------
// | Created by PhpStorm
// +----------------------------
// | Author: YnnSon
// +----------------------------
namespace app\api\controller\v1;

use app\api\service\Vehicle as VehicleService;
use app\api\validate\ServiceValidate;
use think\Request;

class Service extends BaseController
{
    /**
     * @Desc 违章查询
     */
    public function violation()
    {
        (new ServiceValidate())->scene('violation')->goCheck();
        $param = Request::instance()->post();
        return (new VehicleService())->violation($param);
    }
    /**
     * @Desc 违章查询
     */
    public function violationRule()
    {
        $param = Request::instance()->post();
        return (new VehicleService())->violationRule($param);
    }

    /**
     * @Desc 驾照查分
     */
    public function score()
    {
        (new ServiceValidate())->scene('score')->goCheck();
        $param = Request::instance()->post();
        return (new VehicleService())->score($param);
    }
}